// https://www.coze.com/space/7345452538026180614/bot/7346018662320488453
export function COZE_callback() {
  setTimeout(() => {
    function GM_addStyle(cssstr) {
      var D = document;
      var newNode = D.createElement('style');
      newNode.textContent = cssstr;
      var targ =
        D.getElementsByTagName('head')[0] || D.body || D.documentElement;
      targ.appendChild(newNode);
    }

    // GM_addStyle(
    //   [
    //     '.qrPNrOyVEBA326VHThBn{grid-template-columns: 12fr 14fr;}',
    //     '.arQAab07X2IRwAe6dqHV{grid-template-columns: 7fr 13fr;}'
    //   ].join('')
    // );

    // 读取键为'coze'的值
    chrome.storage.sync.get('coze', function (data) {
      if (chrome.runtime.lastError) {
        console.log("Error retrieving coze:", chrome.runtime.lastError);
      } else {
        console.log('data',data);
        let cozeValue = data.coze;
        console.log('The value of coze is: ', cozeValue);
        GM_addStyle(cozeValue);
      }
    });
  }, 1);
}